package com.ytb.controller;

import com.ytb.service.Impl.eventServiceImpl;
import com.ytb.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/event")
public class IEventController {
    @Autowired
    private eventServiceImpl eventService;
    //轮播图
    @GetMapping("/swapper")
    public Result swapper(){

        return eventService.getSwapper();
    }
    //首页活动推荐
    @GetMapping("/random")
    public Result recommend(){
        return eventService.getRandom();
    }
}
